The Joy of SAX
نویسنده
چکیده
Most current XQuery implementations require that all XML data reside in memory in one form or another before they start processing the data. This is unacceptable for large XML documents. The only event-based techniques that do not require the materialization of all data in memory are based on transducers. Transducers use SAX events to evaluate XPath queries using finite state machines. SAX allows parsing and processing of XML documents in a stream fashion, but is hard to use even for simple tasks since it leaves the burden to the programmer to maintain and propagate the state between events. As is well known to people who have written non-trivial SAX event handlers, SAX can be used effectively under a disciplined use of pipes made out of SAX event handlers, where a producer object sends SAX events to a consumer object, which in turn becomes the producer for the next consumer, etc, thus forming a pipe. In this paper, I present an event-based XQuery interpreter, called XStreamQuery, based entirely on SAX pipelines. These pipelines consist of pipes that not only push SAX events from producers to consumers but also return feedback to the producers that allows them to cut the pipes short. This immediate feedback is difficult to achieve with transducers. Even though XStreamQuery is still a prototype system, I expect that, for simple XPath queries, it will have the same low memory overhead as transducers, although with a bit more computational overhead. But I also expect XStreamQuery to beat transducers for complex XQueries, especially for XPaths that contain predicates with embedded XQueries and for deeply-nested XQueries. More importantly, XStreamQuery allows the compositional generation of query plans, eg, one XPath step at a time, rather than requiring to look at the entire path to generate code. This makes the query plan generation very easy. It also allows path pipelines to be seamlessly integrated with the rest of XQuery. In fact, for a substantial subset of XQuery (without optimization), the plan generation code is less than 200 lines of Java while the entire XQuery processor is less than 2000 lines of Java code. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission of the authors. Informal Proceedings of the First International Workshop on XQuery Implementation, Experience, and Perspectives (XIME-P), June 17-18, 2004, Paris, France.
منابع مشابه
Emotions of Musical Instruments
This paper describes a research regarding emotions of musical instruments. The goal is to find out whether it is possible to alter a communicated emotion to a listener by using various musical instruments. These instruments are the piano, marimba, alt sax and cello. After performing an experiment clear differences are visible, especially on the emotions joy and sadness.
متن کاملThe Comparison of two systems of Joy Taper and Bio Race in Transportation and preservation oc central position of curved canals (An invitro Study)
Objective :One of the important measure of proper root canal preparation is Maintaining the original position of the root canal.so ;instrument that result in Minimal change of canal position ,result in better cleaning and shaping . the aim of This study was to comparison of effect of Joy Taper and Bio Race on maintaining of Canal centering ability and transportation by CBCT in mesio buccal cana...
متن کاملAn analytic-Quranic study on joy
Various Quranic verses have introduced some components of happiness and in such subjects as refreshment, gift, thanksgiving, contentment, patience, calamity and sedition one can understand the view of the Quran. Happiness includes the three components of contentment in what is the pleasant, lack of negative emotions in the unpleasant and joy in the pleasant and unpleasant. Belief in Divine owne...
متن کاملInvestigating the Effect of Background Music on the Intention to Buy through Stimulation, Joy, Trust, and the Moderating Product Level
Objective Most of the experts in marketing consider the market (store) environment as an effective factor to attract customers which is used as a strategy to create a pleasant purchasing experience for the customers and influence the consumers’ behavior. Nowadays, hypermarkets pay more attention to the custormers’ comfort while purchasing and try to use a variety of strategies, nice background ...
متن کاملAssessment of the Feeling of Happiness Based on Socio-Economic Status among the Young People between the Age of 15 and 29, Residing in Dist. 5 of Tehran City
Happiness is among the concepts which were subject of empirical studies in 1960s. This concept has been used interchangeably with such concepts as joy, satisfaction with life and the like. While meaningfully correlating with the feeling of joy and satisfaction with life, as indicated by numerous researches, the feeling of happiness is affected by different factors and situations. The present re...
متن کامل